<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<html>
<head>
    <title>后台书籍管理</title>
    <link rel="stylesheet" type="text/css" href="<s:url value="/inc/style.css"/>">
    <script type="text/javascript" src="<s:url value="/js/jquery.js"/>"></script>
</head>
<body>
<center>
    <s:action name="header" executeResult="true" namespace="/"/>
    <table width="900">
        <tr>
            <td height="30">当前位置>>后台书籍管理</td>
        </tr>
    </table>
    <form action="<s:url value="/bookmanager_list.action"/>" method="post">
        <table width="900">
            <tr>
                <td>书籍名称：<input type="text" name="bookName" value="<s:property value="model.bookName"/>">&nbsp;&nbsp;<input type="submit" value="查询"/>&nbsp;<input type="button" value="新增书籍" id="J_add"/></td>
             </tr>
        </table>
    </form>
    <table width="900" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bordercolordark="#FFFFFF"  bordercolorlight="#888888">
        <tr bgcolor="#DDDDEE">
            <td height="35" width="10%">书籍标识</td>
            <td width="20%">书名</td>
            <td width="15%">类别</td>
            <td width="10%">作者</td>
            <td width="25%">出版社</td>
            <td width="20%">操作</td>
        </tr>
        <s:iterator value="booklist" id="b">
            <tr>
                <td align="center" height="35"><s:property value="#b.id"/></td>
                <td><img src="<s:url value="/upload/%{#b.pic}"/>" height="120" width="90">  <s:property value="#b.bookName"/></td>
                <td align="center"><s:property value="#b.categoryName"/></td>
                <td align="center"><s:property value="#b.author"/></td>
                <td align="center"><s:property value="#b.publisher"/></td>
                <td align="center"><a href="<s:url value="/bookmanager_edit.action"/>?id=<s:property value="#b.id"/>">编辑</a>&nbsp;&nbsp;<a href="<s:url value="/bookmanager_delete.action"/>?id=<s:property value="#b.id"/>">删除</a></td>
            </tr>
        </s:iterator>
    </table>
</center>
<script type="text/javascript">
    $(function(){
        $("#J_add").click(function(){
            self.location.href="manager/book_add.jsp";
        })
    })
</script>
</body>
</html>
